<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div align="center" class="body">
		<h2>게시물 상세 화면</h2>
		<table>
			<tr>
				<td align="center">
					<table id="detail">
						<caption>상세 화면</caption>
						<tr height="40" align="left">
							<td bgcolor="f6f6f6" width="80">&nbsp;&nbsp;&nbsp;번호</td>
							<td>&nbsp;&nbsp;&nbsp;${BOARD.posts_no }</td>
						</tr>

						<tr height="40" align="left">
							<td bgcolor="f6f6f6" width="80">&nbsp;&nbsp;&nbsp;제목</td>
							<td>&nbsp;&nbsp;&nbsp;${BOARD.posts_title  }</td>
						</tr>
						<tr height="40" align="left">
							<td bgcolor="f6f6f6" width="80">&nbsp;&nbsp;&nbsp;작성자</td>
							<td>&nbsp;&nbsp;&nbsp;${BOARD.posts_Author  }</td>
						</tr>
						<tr height="40" align="left">
							<td bgcolor="f6f6f6" width="80">&nbsp;&nbsp;&nbsp;조회수</td>
							<td width="150">&nbsp;&nbsp;&nbsp;${BOARD.rec_count  }</td>
						</tr>
						<tr height="40" align="left">
							<td bgcolor="f6f6f6" width="50">&nbsp;&nbsp;&nbsp;내용</td>
							<td>&nbsp;&nbsp;&nbsp; ${BOARD.posts_contents  } <img
								width="215" height="255" src="/resources/image/${BOARD.image}">
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center" width="240">
								<a href="deletereview?posts_no=${BOARD.posts_no}">삭제하기</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>

	<!-- 	코멘트 리스트  -->
	<table width=60% border="1" align=center margin=0 padding=0 cellpadding=0 cellspacing=1 style="border-width: 1; border-color: rgb(204, 204, 204); border-style: dotted;">
		<c:forEach items="${COMMENT}" var="COMMENT" varStatus="cnt">
			<tr bgcolor="#f0f0f0">
				<td width="13%" align=center style='word-break: break-all;' rowspan="2"><b>${COMMENT.comment_name}</b></td>
				<td style="border-left: 0 none;">
					<a href="deletereviewcomment?comment_no=${COMMENT.comment_no }">삭제</a>
				</td>
			</tr>
			<tr align="left" bgcolor="#f0f0f0">
				<td colspan="2" style='word-break: break-all;'>${COMMENT.comment_comment}</td>
			</tr>

			<tr align="left" bgcolor="#f0f0f0">
				<td colspan="2" style='word-break: break-all;'>
					<div id="div_review1Form${cnt.index }" style="hidden: none"></div>
				</td>
			</tr>
			<c:forEach items="${replyList}" var="reply" varStatus="cnt">
				<td style="border-left: 0 none;">
				<tr>
					<td width="13%" align=center style='word-break: break-all;' rowspan="2"><b>${reply.writer}</b> 
					<input type="hidden" name="comment_no" value="${reply.comment_no}"></td>

					<td align="left" width="75%" style="border-right: 0 none;">${reply.date}</td>
					<td style="border =left: 0 none;">
						<a href="qnacommentDelete?comment_no=${reply.comment_no }">삭제</a>
					</td>
				</tr>

				<tr align="left" bgcolor="#f0f0f0">
					<td colspan="2" style='word-break: break-all;'>${reply.content}</td>
				</tr>
				<tr align="left" bgcolor="#f0f0f0">
					<td colspan="2" style='word-break: break-all;'>
						<div id="div_commentreview2Form${cnt.index }" style="hidden: none"></div>
					</td>
				</tr>
			</c:forEach>
		</c:forEach>
	</table>
</body>
</html>